package com.woniuxy.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.woniuxy.mapper.GuestMapper;
import com.woniuxy.pojo.Guest;
import com.woniuxy.pojo.Guest_yyh;
import com.woniuxy.service.GuestService;

import lombok.Data;

@Service
@Data
public class GuestServiceImp implements GuestService{
	@Resource
	private GuestMapper guestMapper;
	
	@Override
	public String addGuest(Guest guest) {
		String result="添加失败";
		int re=guestMapper.adGuest(guest);
		if(re>0){
			result="添加成功";
		}
		return result;
	}

	@Override
	public List<Guest> getAllG() {
		return null;
	}

	@Override
	public List<Guest_yyh> getCheckinG() {
		return guestMapper.getCheckinG();
	}

	@Override
	public List<Guest_yyh> selG(String message) {
		return guestMapper.selG("%"+message+"%");
	}

	@Override
	public Guest findGuest(Guest guest) {
		return guestMapper.findGuest(guest);
	}

	@Override
	public List<Guest> findGuests(Guest guest) {
		return guestMapper.findGuests(guest);
	}

	
}
